<?php
/**
 * @version     1.0.1
 * @package     com_ganeshavereadores
 * @copyright  	
 * @license     
 * @author      Jorge Eduardo
 */
// No direct access to this file
defined('_JEXEC') or die('Restricted access');

JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('behavior.keepalive');
JHtml::_('formbehavior.chosen', 'select');

?>
<script type="text/javascript">
	Joomla.submitbutton = function(task)
	{
		if (task == 'proposicao.cancel' || document.formvalidator.isValid(document.id('edit-form'))) {
			Joomla.submitform(task, document.getElementById('edit-form'));
		}
		else {
			alert('<?php echo $this->escape(JText::_('JGLOBAL_VALIDATION_FORM_FAILED'));?>');
		}
	}
</script>

<form action="<?php echo JRoute::_('index.php?option=com_ganeshavereadores&layout=edit&id='.(int) $this->item->id); ?>" method="post" enctype="multipart/form-data" name="adminForm" id="edit-form" class="form-validate">
	<div class="row-fluid">
		<div class="span10 form-horizontal">
			<fieldset>
			<div class="tab-content">
				<div class="tab-pane active" id="details">
					<?php $field = $this->form->getField('id');?>
				<?php if($field){ ?>
				<div class="control-group">
					<?php if (!$field->hidden): ?>
						<div class="control-label">
						<?php echo $field->label; ?>
					</div>
					<?php endif; ?>
					<div class="controls">
						<?php echo $field->input; ?>
					</div>
				</div>
				<?php } ?>
				<?php $field = $this->form->getField('categoria');?>
				<?php if($field){ ?>
				<div class="control-group">
					<?php if (!$field->hidden): ?>
						<div class="control-label">
						<?php echo $field->label; ?>
					</div>
					<?php endif; ?>
					<div class="controls">
						<?php echo $field->input; ?>
					</div>
				</div>
				<?php } ?>
				<?php $field = $this->form->getField('vereador');?>
				<?php if($field){ ?>
				<div class="control-group">
					<?php if (!$field->hidden): ?>
						<div class="control-label">
						<?php echo $field->label; ?>
					</div>
					<?php endif; ?>
					<div class="controls">
						<?php echo $field->input; ?>
					</div>
				</div>
				<?php } ?>
				<?php $field = $this->form->getField('ano');?>
				<?php if($field){ ?>
				<div class="control-group">
					<?php if (!$field->hidden): ?>
						<div class="control-label">
						<?php echo $field->label; ?>
					</div>
					<?php endif; ?>
					<div class="controls">
						<?php echo $field->input; ?>
					</div>
				</div>
				<?php } ?>
				<?php $field = $this->form->getField('data');?>
				<?php if($field){ ?>
				<div class="control-group">
					<?php if (!$field->hidden): ?>
						<div class="control-label">
						<?php echo $field->label; ?>
					</div>
					<?php endif; ?>
					<div class="controls">
						<?php echo $field->input; ?>
					</div>
				</div>
				<?php } ?>
				<?php $field = $this->form->getField('numero');?>
				<?php if($field){ ?>
				<div class="control-group">
					<?php if (!$field->hidden): ?>
						<div class="control-label">
						<?php echo $field->label; ?>
					</div>
					<?php endif; ?>
					<div class="controls">
						<?php echo $field->input; ?>
					</div>
				</div>
				<?php } ?>
				<?php $field = $this->form->getField('titulo');?>
				<?php if($field){ ?>
				<div class="control-group">
					<?php if (!$field->hidden): ?>
						<div class="control-label">
						<?php echo $field->label; ?>
					</div>
					<?php endif; ?>
					<div class="controls">
						<?php echo $field->input; ?>
					</div>
				</div>
				<?php } ?>
				<?php $field = $this->form->getField('conteudo');?>
				<?php if($field){ ?>
				<div class="control-group">
					<?php if (!$field->hidden): ?>
						<div class="control-label">
						<?php echo $field->label; ?>
					</div>
					<?php endif; ?>
					<div class="controls">
						<?php echo $field->input; ?>
					</div>
				</div>
				<?php } ?>
				
			</div>
			</fieldset>

		</div>
	</div>
	<input type="hidden" name="task" value="" />
	<?php echo JHtml::_('form.token'); ?>
	<div class="clr"></div>
</form>